<script >
    export default{
        methods:{
            go1(){
                this.$router.go(1)
            }
        }
    }
</script>

<template>  
<div>
    {{ $route.params.id }}
    <br>
    <RouterLink to="/home/2">首页切换2</RouterLink>
    <br>
    <RouterLink to="/home/1">首页切换1</RouterLink>
    <br>
    <RouterLink to="/">返回</RouterLink>
    <br>
<button @click="go1">go(1)</button>
    <RouterView></RouterView>
</div>
</template>

<style scoped>

</style>
